<?php
include_once 'clsEssentials.php';
include_once '../common-files/xml-to-array.php';
class clsFormLayouts
{
	function frmPopulateChangePassword()
	{
		?>
				<form id="frmChangePassword" name="frmChangePassword" method="post" action="#">
				<table cellpadding="2px" cellspacing="1px" bgcolor="#F4F5F7" width="100%" style="height:360px;" class="tableBorder">
			    <tr>
			        <td colspan="2" bgcolor="#0066FF" valign="bottom">
			        	<label style="float: right;vertical-align: text-bottom;color:#FFF">Both fields are mandatory </label>
			        </td>
			    </tr>
			     <tr>
			        <td colspan="2">
			        <input type="hidden" id="hdnUserName" name="hdnUserName" value="<?php echo $userName; ?>" />
			        </td>
			        
			    </tr>
			    
			    <tr>
			        <td class="label" align="right" width="40%">New Password:</td>
			        <td align="left" width="60%"><input type="password" id="txtNewPass" name="txtNewPass" style="width: 160px;" maxlength="200"/></td>
			    </tr>
			    <tr>
			        <td class="label" align="right">Confirm Password:</td>
			        <td align="left"><input type="password" name="txtConfirmPassword" id="txtConfirmPassword" maxlength="50" style="width: 160px;" /></td>
			    </tr>
			    
			    <tr>
			    	<td colspan="2">&nbsp;</td>
			    </tr>
			    <tr>
			        <td align="center" colspan="2">
				        <input class="normalBtn" type="button" value="Update >>" id="btnLogin" name="btnLogin" onclick="return doCheckPassword();" />
				        <input class="normalBtn" type="reset" value="Reset >>" id="btnReset" name="btnReset" />
			        </td>
			    </tr>                  
			    
			               
			</table>			
			</form>
		<?php 
	}
	
	
	function frmPopulateChangeNumber()
	{
		$objMyClass = new clsEssentials();
		?>
		<form id="frmChangeNumber" name="frmChangeNumber" method="post" action="#">
				<table cellpadding="2px" cellspacing="1px" bgcolor="#F4F5F7" width="100%" style="height:360px;" class="tableBorder">
			    <tr>
			        <td colspan="2" bgcolor="#0066FF" valign="bottom">
			        	<label style="float: right;vertical-align: text-bottom;color:#FFF">&nbsp;</label>
			        </td>
			    </tr>
			     <tr>
			        <td colspan="2">&nbsp;
			       
			        </td>
			        
			    </tr>
			    
			    <tr>
			        <td class="label" align="right" width="40%">Currernt Contact Number:&nbsp;</td>
			        <td align="left" width="60%">
			        <?php 
						$currentContactNumber = $objMyClass->currentContactNumber();
						print $currentContactNumber;
			        ?>
			    </tr>
			    <tr>
			        <td class="label" align="right">Update Contact Number:</td>
			        <td align="left"><input type="text" name="txtContactNumber" id="txtContactNumber" maxlength="50" style="width: 160px;" /></td>
			    </tr>
			    
			    <tr>
			    	<td colspan="2">&nbsp;</td>
			    </tr>
			    <tr>
			        <td align="center" colspan="2">
				        <input class="normalBtn" type="button" value="Update >>" id="btnLogin" name="btnLogin" onclick="return doCheckNumber();" />
				        <input class="normalBtn" type="reset" value="Reset >>" id="btnReset" name="btnReset" />
			        </td>
			    </tr>                  
			    
			               
			</table>			
			</form>
		<?php 
	}
	
	function  frmPopulateEmailAddress()
	{
		$objMyClass = new clsEssentials();
		?>
		<form id="frmChangeEmail" name="frmChangeEmail" method="post" action="#">
				<table cellpadding="2px" cellspacing="1px" bgcolor="#F4F5F7" width="100%" style="height:360px;" class="tableBorder">
			    <tr>
			        <td colspan="2" bgcolor="#0066FF" valign="bottom">
			        	<label style="float: right;vertical-align: text-bottom;color:#FFF">&nbsp;</label>
			        </td>
			    </tr>
			     <tr>
			        <td colspan="2">&nbsp;
			       
			        </td>
			    </tr>
			    <tr>
			        <td class="label" align="right" width="40%">Currernt Email Address:&nbsp;</td>
			        <td align="left" width="60%">
			        <?php 
						$currentEmailAddress = $objMyClass->currentEmailAddress();
						print $currentEmailAddress;
			        ?>
			    </tr>
			    <tr>
			        <td class="label" align="right">Update Email Address:</td>
			        <td align="left"><input type="text" name="txtContactEmail" id="txtContactEmail" maxlength="50" style="width: 160px;" /></td>
			    </tr>
			    
			    <tr>
			    	<td colspan="2">&nbsp;</td>
			    </tr>
			    <tr>
			        <td align="center" colspan="2">
				        <input class="normalBtn" type="button" value="Update >>" id="btnLogin" name="btnLogin" onclick="doCheckEmail();" />
				        <input class="normalBtn" type="reset" value="Reset >>" id="btnReset" name="btnReset" />
			        </td>
			    </tr>         
			</table>			
			</form>
		<?php 
	}
	
	
	
	function  frmPopulateAddFeedBack()
	{
		$objMyClass = new clsEssentials();
		?>
		
		<form id="frmAddFeedBack" name="frmAddFeedBack" method="post" action="#">
				<table cellpadding="2px" cellspacing="1px" bgcolor="#F4F5F7" width="100%" style="height:360px;" class="tableBorder">
			    <tr>
			        <td colspan="2" bgcolor="#0066FF" valign="bottom">
			        	<label style="float: right;vertical-align: text-bottom;color:#FFF">&nbsp;</label>
			        </td>
			    </tr>
			     <tr>
			        <td colspan="2">&nbsp;
			       
			        </td>
			    </tr>
			    <tr>
			        <td class="label" align="right" width="40%">Customer Name:&nbsp;</td>
			        <td align="left" width="60%">
			        	<input type="text" name="txtCusName" id="txtCusName" maxlength="200" style="width: 160px;" />
			        </td>
			    </tr>
			    <tr>
			        <td class="label" align="right" width="40%">Customer Country:&nbsp;</td>
			        <td align="left" width="60%">
			        	<input type="text" name="txtCusCountry" id="txtCusCountry" maxlength="200" style="width: 160px;" />
			        </td>
			    </tr>
			    <tr>
			        <td class="label" align="right" width="40%">Customer Gender:&nbsp;</td>
			        <td align="left" width="60%">
			        	<select id="selectGender" name="selectGender">
			        		<option id="select" value="select">-Select-</option>
			        		<option id="select" value="M">Male</option>
			        		<option id="select" value="F">Female</option>
			        	</select>
			        </td>
			    </tr>
			    <tr>
			        <td class="label" align="right">Enter Feedback:</td>
			        <td align="left">
			        	<textarea rows="5" cols="35" id="txtAreaFeedback" name="txtAreaFeedback"></textarea>
			        </td>
			    </tr>
				 <tr>
			        <td class="label" align="right" width="40%">Customer Image:&nbsp;</td>
			        <td align="left" width="60%">
			        	<input type="file"  name="txtCusName" id="txtCusName"  style="width: 160px;" />
			        </td>
			    </tr>
			    
			    <tr>
			        <td align="center" colspan="2">
				        <input class="normalBtn" type="button" value="Add >>" id="btnLogin" name="btnLogin" onclick="editFeedBack();" />
				        <input class="normalBtn" type="reset" value="Reset >>" id="btnReset" name="btnReset" />
			        </td>
			    </tr>         
			</table>			
			</form>
		<?php 
	}
	
	function  frmPopulateAllFeedBack()
	{
		$objMyClass = new clsEssentials();
		$items = array();
		$items = $objMyClass->getAllFeedBack();
		
		?>
		<table cellpadding="2px" cellspacing="1px" width="745px">
	    <tr height="25px;">
	        <td colspan="7" bgcolor="#3fCEDF">
	        	<label style="font-family: Arial;font-size: 13px;color: #492626;font-weight: bold;">All Feedback</label>
	        	<label style="font-family: Arial;font-size: 13px;color: #492626;font-weight: bold;float: right;"><a href="#add_feedback" class='inline'>Add Feedback</a></label>
	        </td>
	    </tr>
	    <tr height="30px;" bgcolor="#325169" style="color: #FFFFFF;">
        	<td width="40px">Sl No</td>
        	<td width="160px">cus_name</td>
        	<td>cus_country</td>
        	<td>cus_feedback</td>
        	<td>cus_gender</td>
        	
        	<td>Actions</td>
		</tr>
		<?php 
		if(count($items)>0)
		{
			$count = 0;
			foreach($items as $item)
			{
				$count++;
				if($count%2==0)
				{
					$style='bgcolor="#CDCDCD"';
				}
				else
				{
					$style='bgcolor="#CFCFCF"';
				}
				?>
				<tr <?php echo $style; ?> height="35px" id="<?php echo $count."_id"; ?>">
					<td><?php echo $count; ?></td>
					<td><?php echo $item['cus_name']; ?></td>
					<td><?php echo $item['cus_country']; ?></td>
					<td><?php echo $item['cus_feedback']; ?></td>
					<td><?php echo $item['cus_gender']; ?></td>
					
					<td><a style="cursor: pointer;" class='inline' href="#inline_content_<?php echo $count; ?>">Edit</a> | <a style="cursor: pointer;" onclick="deletePack('<?php echo $item['id']; ?>')";>Delete</a></td>
				</tr>
				<tr>
					<td>
						<div style='display:none'>
			<div id='inline_content_<?php echo $count; ?>' style='padding:10px; background:#fff;'>
			<table cellpadding="10" cellspacing="0">
			<tr height="30px">
				<td width="100px" style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">cus_name:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300"  size="40" type="text" value="<?php echo $item['cus_name']; ?>" id="cus_name"></</td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">cus_country:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="<?php echo $item['cus_country']; ?>" id="cus_country" /></td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">cus_feedback:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="<?php echo $item['cus_feedback']; ?>" id="cus_feedback" /></td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">cus_gender:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="<?php echo $item['cus_gender']; ?>" id="cus_gender" /></td>
			</tr>
			
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><a style="cursor: pointer;" onclick="updatePackage('<?php echo $item['id']; ?>')">Update</a> | <a style="cursor: pointer;" onclick="deletePack('<?php echo $item['id']; ?>')";>Delete</a></td>
			</tr>
			</table>
			</div>
			</div>
			
			<div style='display:none'>
			<div id='add_feedback' style='padding:10px; background:#fff;'>
			<table cellpadding="10" cellspacing="0">
			<tr height="30px">
				<td width="100px" style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">cus_name:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300"  size="40" type="text" value="" id="cus_name"></</td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">cus_country:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="" id="cus_country" /></td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">cus_feedback:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="" id="cus_feedback" /></td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">cus_gender:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="" id="cus_gender" /></td>
			</tr>
			
			<tr>
				<td colspan="2" align="right" style="color: #0D75A5;font-family: Arial;font-size: 13px;text-decoration: underline;"><a style="cursor: pointer;" onclick="addPackage()">Add This feedback</a></td>
			</tr>
			</table>
			</div>
			
			</div>
					</td>
				</tr>
				<?php 
			}
			?>
			<?php 
		}
		?>
		</table>
		
		
		<?php
		}
	
	
	function frmPopulateAllPackages()
	{
		$objMyClass = new clsEssentials();
		$items = array();
		$items = $objMyClass->getAllPackages();
		?>
		<table cellpadding="2px" cellspacing="1px" width="745px">
	    <tr height="25px;">
	        <td colspan="7" bgcolor="#3fCEDF">
	        	<label style="font-family: Arial;font-size: 13px;color: #492626;font-weight: bold;">All Packages</label>
	        	<label style="font-family: Arial;font-size: 13px;color: #492626;font-weight: bold;float: right;"><a href="#add_package" class='inline'>Add Package</a></label>
	        </td>
	    </tr>
	    <tr height="30px;" bgcolor="#325169" style="color: #FFFFFF;">
        	<td width="40px">Sl No</td>
        	<td width="160px">Plans</td>
        	<td>Price</td>
        	<td>Validity</td>
        	<td>PC's</td>
        	<td>Additional PC</td>
        	<td>Actions</td>
		</tr>
		<?php 
		if(count($items)>0)
		{
			$count = 0;
			foreach($items as $item)
			{
				$count++;
				if($count%2==0)
				{
					$style='bgcolor="#CDCDCD"';
				}
				else
				{
					$style='bgcolor="#CFCFCF"';
				}
				?>
				<tr <?php echo $style; ?> height="35px" id="<?php echo $count."_id"; ?>">
					<td><?php echo $count; ?></td>
					<td><?php echo $item['plans']; ?></td>
					<td><?php echo $item['price']; ?></td>
					<td><?php echo $item['validity']; ?></td>
					<td><?php echo $item['pcs']; ?></td>
					<td><?php echo $item['additionalpc']; ?></td>
					<td><a style="cursor: pointer;" class='inline' href="#inline_content_<?php echo $count; ?>">Edit</a> | <a style="cursor: pointer;" onclick="deletePack('<?php echo $item['id']; ?>')";>Delete</a></td>
				</tr>
				<tr>
					<td>
						<div style='display:none'>
			<div id='inline_content_<?php echo $count; ?>' style='padding:10px; background:#fff;'>
			<table cellpadding="10" cellspacing="0">
			<tr height="30px">
				<td width="100px" style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">Plans:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300"  size="40" type="text" value="<?php echo $item['plans']; ?>" id="plans"></</td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">Price:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="<?php echo $item['price']; ?>" id="price" /></td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">Validity:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="<?php echo $item['validity']; ?>" id="validity" /></td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">Pc's:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="<?php echo $item['pcs']; ?>" id="pcs" /></td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">Additional PC:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="<?php echo $item['additionalpc']; ?>" id="additionalpc" /></td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><a style="cursor: pointer;" onclick="updatePackage('<?php echo $item['id']; ?>')">Update</a> | <a style="cursor: pointer;" onclick="deletePack('<?php echo $item['id']; ?>')";>Delete</a></td>
			</tr>
			</table>
			</div>
			</div>
			
			<div style='display:none'>
			<div id='add_package' style='padding:10px; background:#fff;'>
			<table cellpadding="10" cellspacing="0">
			<tr height="30px">
				<td width="100px" style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">Plans:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300"  size="40" type="text" value="" id="plans"></</td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">Price:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="" id="price" /></td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">Validity:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="" id="validity" /></td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">Pc's:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="" id="pcs" /></td>
			</tr>
			<tr>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px;font-weight: bold;">Additional PC:</td>
				<td style="color: #0D75A5;font-family: Arial;font-size: 13px"><input style="color: #0D75A5;" width="300" size="40" type="text" value="" id="additionalpc" /></td>
			</tr>
			<tr>
				<td colspan="2" align="right" style="color: #0D75A5;font-family: Arial;font-size: 13px;text-decoration: underline;"><a style="cursor: pointer;" onclick="addPackage()">Add This Package</a></td>
			</tr>
			</table>
			</div>
			
			</div>
					</td>
				</tr>
				<?php 
			}
			?>
			<?php 
		}
		?>
		</table>
		
	
		<?php 
	}
	
}

